import React from 'react';

import { Modal, View, StyleSheet } from 'react-native';
import InputBar from './input-bar';

export default ({ modalVisible, onClose, placeholder, keyboardType, onSearch, btnText, numberOfLines }) => (
  <Modal
    visible={modalVisible}
    animationType="none"
    transparent
    onRequestClose={onClose}
  >
    <View style={styles.container}>
      <InputBar placeholder={placeholder} cancel={onClose} search={onSearch} keyboardType={keyboardType} btnText={btnText} numberOfLines={numberOfLines} />
    </View>
  </Modal>
);

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'flex-end',
    alignItems: 'center',
    backgroundColor: 'rgba(0,0,0,0.7)',
  },
});
